//
//  DZHomeController.swift
//  Swift微博
//
//  Created by 董筱泽 on 16/10/22.
//  Copyright © 2016年 董筱泽. All rights reserved.
//

import UIKit

class DZHomeController: DZVisitorViewController {

    
    


    override func viewDidLoad() {
        super.viewDidLoad()
        // 判断用户是否登录
        if !isLogin {
            // 设置访客视图信息
            visitorView?.setupVisitorViewInfo(imgName: nil, tilte: nil)
            return
        }
        setupUI()
    }

    @objc private func leftClick(){
        print("左")
    }
    @objc private func rightClick(){
        let tempV = TempController()
        tempV.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(tempV, animated: true)
    }
    
    // MARK: - 设置视图
    private func setupUI(){
        setupNav()
    }
    // MARK: - 设置导航
    private func setupNav(){
        navigationItem.leftBarButtonItem = UIBarButtonItem(setHighlightedImgName: "navigationbar_pop", target: self, action: #selector(leftClick))
        navigationItem.rightBarButtonItem = UIBarButtonItem(setHighlightedImgName: "navigationbar_friendsearch", target: self, action: #selector(rightClick))
    }
}
